import type { ApiType } from 'src/service/api';
import { noticeTag } from 'src/service/api/notice';
import { ref } from 'vue';

export const nTag = ref<ApiType<typeof noticeTag>['Return']>({
  listFlag: false,
  peopleFlag: false,
  favoriteFlag: false,
  hideRed: false,
  noticeType: {},
});

export const initNoticeTag = () => {
  noticeTag()
    .then(({ data, error }) => {
      if (error) {
        return;
      }
      nTag.value = data;
    })
    .catch(() => {});
};
